﻿@using System.Text;
@model List<Luckyu.App.Workflow.wf_flow_instanceEntity>;
@{
    Layout = "~/Views/Shared/_LayoutForm.cshtml";
}
@section Header{
    @Html.AppendCss("~/js/workflow/scroll.css")
    @Html.AppendCss("~/js/workflow/workflow.css")
    <style type="text/css">
        .scroll-wrap {
            overflow: scroll;
        }

        #tabInstance > .layui-tab-title {
            float: left;
            width: 120px;
            height: auto;
            white-space: normal;
        }

            #tabInstance > .layui-tab-title li {
                display: block;
                line-height: initial;
                text-align: left;
            }

            #tabInstance > .layui-tab-more li.layui-this:after, #tabInstance > .layui-tab-title .layui-this:after {
                border: none;
                border-radius: 0;
                border-left: 2px solid #5FB878;
                height: -webkit-fill-available;
            }

        #tabInstance > .layui-tab-content {
            float: left;
            padding: 0 5px 0 5px;
            position: absolute;
            left: 120px;
        }

        .layui-timeline-item {
            padding-bottom: 0;
        }

        .gridLog tr.jqgrow td {
            overflow: hidden !important;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
}


<div class="layui-tab layui-tab-brief" id="tabInstance">
    <ul class="layui-tab-title">
        @{
            for (int i = 0; i < Model.Count; i++)
            {
                <li class="@(i==Model.Count-1?"layui-this":"")" luckyu-id="@Model[i].instance_id">
                    @Model[i].flowname
                    <br />
                    @Model[i].createtime.Value.ToString("yyyy-MM-dd")
                    <br />
                    @Model[i].createtime.Value.ToString("HH:mm")
                </li>
            }
        }
    </ul>
    <div class="layui-tab-content">
        @{
            for (int i = 0; i < Model.Count; i++)
            {
                <div class="layui-tab-item @(i==Model.Count-1?"layui-show":"")" luckyu-id="@Model[i].instance_id">
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">日志</li>
                            <li>流程</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--审批日志-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-col-xs12">
                                    <table id="gridLog_@Model[i].instance_id" class="gridLog"></table>
                                </div>
                            </div>
                            <!--流程-->
                            <div class="layui-tab-item">
                                <div class="layui-col-xs12">
                                    <div id="flow_@Model[i].instance_id"></div>
                                    <div style="position:relative;left:0px;bottom:0;width:100%;height:40px;border-top:1px solid #ddd;line-height:39px;text-align:right;padding-right:10px;font-size:16px;">
                                        <div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#5bc0de;" class="fa fa-square"></i><span>正在审批</span></div>
                                        <div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#5cb85c;" class="fa fa-square"></i><span>通过</span></div>
                                        <div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#d9534f;" class="fa fa-square"></i><span>不通过</span></div>
                                        <div style="display: inline-block;margin-left: 10px;"><i style="padding-right:5px;color:#999;" class="fa fa-square"></i><span>未处理</span></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            }
        }
    </div>
</div>

@section Footer{
    @Html.AppendJs("~/js/workflow/mousewheel.js")
    @Html.AppendJs("~/js/workflow/scroll.js")
    @Html.AppendJs("~/js/workflow/workflow.js")
    @Html.AppendJs("~/Areas/WorkflowModule/Views/Task/LogFormByProcessId.js")
}
